﻿using NDF.Utilities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UA.Data.Model.Common;

namespace UA.Framework.Views
{
    public abstract class ViewBase
    {

        public virtual TEntity ToEntity<TEntity>() where TEntity : EntityModelBase, new()
        {
            TEntity entity = new TEntity();
            this.CopyTo(entity);
            return entity;
        }

        public virtual void CopyForm(EntityModelBase entity)
        {
            entity.CopyTo(this);
        }


    }
}
